package io.mft.api.domain;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

import cn.hutool.core.util.ObjectUtil;
import io.mft.commons.util.Unique;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@JsonInclude(Include.NON_DEFAULT)
public class OutputParameter implements Unique,Serializable{
	 
	        /**
	 * @说明：TODO
	 * @字段名称 serialVersionUID
	        */  
	    
	private static final long serialVersionUID = -8870700716495533319L;
	private String key;
	private String name;
	@JsonInclude(Include.NON_EMPTY) 
	private String example="";
	@JsonInclude(Include.NON_EMPTY) 
	private String mapping="";
	@JsonInclude(Include.NON_EMPTY) 
	private String remark="";
	@JsonInclude(Include.NON_EMPTY) 
	private String defaultValue="";
	@Override
	public String uniqueId() {
		return key;
	}
	
	public String mapping() {
		if (ObjectUtil.isEmpty(mapping)) {
			return key;
		}else {
			return mapping;
		}
	}
}
